import * as THREE from 'three';

const geometry = new THREE.BufferGeometry();

const point1 = new THREE.Vector3(0, 0, 0);
const point2 = new THREE.Vector3(100, 0, 0);    
const point3 = new THREE.Vector3(0, 100, 0);

geometry.setFromPoints([point1, point2, point3]);

const colors = new Float32Array([
    1, 0, 0,
    0, 1, 0,
    0, 0, 1
]);
geometry.setAttribute('color', new THREE.BufferAttribute(colors, 3));

const material = new THREE.PointsMaterial({
    vertexColors: true,
    size: 30
});
const mesh = new THREE.Points(geometry, material);


const material1 = new THREE.LineBasicMaterial({
    vertexColors: true
});
const mesh1 = new THREE.LineLoop(geometry, material1);


const material2 = new THREE.MeshBasicMaterial({
    // doubleSided: true,
    vertexColors: true
});
const mesh2 = new THREE.Mesh(geometry, material2);

export {
    mesh,
    mesh1,
    mesh2
}